package cn.mw.cmdb.entity;

import cn.mw.cmdb.param.MwKeyValueParam;
import cn.mw.cmdb.service.ServiceChoose;
import cn.mw.cmdb.service.impl.InstanceDetailTabServiceImpl;
import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * 资产详情tab信息
 */
@Data
@Document("mw_instance_detail_table")
public class MwInstanceDetailTabInfo implements ServiceChoose {
    @CMDBProperty
    @AutoId
    @Schema(description = "id")
    protected String id;

    @CMDBProperty(searchType = PropertyTypeList.ID)
    @Schema(description = "详情展示tab数据")
    private List<MwKeyValueParam> tabList;

    @CMDBProperty(searchType = PropertyTypeString.ID)
    @Schema(description = "模型分组Id")
    private String modelGroupId;

    @Transient
    private String instanceId;

    @Override
    @Schema(description = "模型服务Id")
    public String getServiceId() {
        return InstanceDetailTabServiceImpl.ID;
    }


}
